package cn.wolfcode.rbac.domain;

import com.alibaba.fastjson.JSON;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.HashMap;

@Data @NoArgsConstructor @AllArgsConstructor
public class CustomerTraceHistory extends BaseDomain {
    private String customerName;
    private Long customerId;
    private String traceTime;
    private String traceDetails;
    private Long traceTypeId;
    private String traceType;
    private Integer traceResult;
    private String displayTraceResult;
    private String remark;
    private Integer type;
    private String displayType;
    private String inputUserName;

    public String getJson(){
        HashMap map = new HashMap();
        map.put("id",id);
        map.put("customerId",customerId);
        map.put("customerName",customerName);
        map.put("traceTime",traceTime);
        map.put("traceDetails",traceDetails);
        map.put("traceTypeId",traceTypeId);
        map.put("traceResult",traceResult);
        map.put("remark",remark);
        map.put("type",type);
        return JSON.toJSONString(map);
    }

    public CustomerTraceHistory(Long id, String customerName, Long customerId, String traceTime, String traceDetails, Long traceTypeId, String traceType, Integer traceResult, String displayTraceResult, String remark, Integer type, String displayType, String inputUserName) {
        super(id);
        this.customerName = customerName;
        this.customerId = customerId;
        this.traceTime = traceTime;
        this.traceDetails = traceDetails;
        this.traceTypeId = traceTypeId;
        this.traceType = traceType;
        this.traceResult = traceResult;
        this.displayTraceResult = displayTraceResult;
        this.remark = remark;
        this.type = type;
        this.displayType = displayType;
        this.inputUserName = inputUserName;
    }

    @Override
    public String toString() {
        return "CustomerTraceHistory{" +
                "id=" + id +
                ", customerName='" + customerName + '\'' +
                ", customerId=" + customerId +
                ", traceTime='" + traceTime + '\'' +
                ", traceDetails='" + traceDetails + '\'' +
                ", traceTypeId=" + traceTypeId +
                ", traceType='" + traceType + '\'' +
                ", traceResult=" + traceResult +
                ", displayTraceResult='" + displayTraceResult + '\'' +
                ", remark='" + remark + '\'' +
                ", type=" + type +
                ", displayType='" + displayType + '\'' +
                ", inputUserName='" + inputUserName + '\'' +
                '}';
    }
}
